<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/24
 * Time: 15:10
 */
Route::match(['get','post'],'admin/login','Admin\LoginController@login');
//使用中间件控制非法登录->若在RouteServiceProvider配置文件中定义了路由前缀,可以['middleware'=>'check.login','prefix'=>'admin']这样写,在数组中的路由定义就不用在写admin
Route::group(['middleware'=>'check.login'],function(){
	Route::get('admin/getout','Admin\LoginController@loginOut');//退出登陆
	Route::get('admin/index','Admin\IndexController@index');//首页
	Route::get('admin/welcome','Admin\IndexController@welcome');//我的桌面
	Route::get('admin/userlist','Admin\UserController@userlist');//用户列表
	Route::post('admin/userlist/userstop','Admin\UserController@userstop');//用户封号
	Route::post('admin/userlist/userstart','Admin\UserController@userstart');//用户封号
	Route::get('admin/userlist/changeproxy/{userid}','Admin\UserController@changeproxy');//指定代理
	Route::post('admin/userlist/changeproxyed','Admin\UserController@changeproxyed');//指定代理
	Route::get('admin/proxy','Admin\UserController@proxylist');//代理列表
	Route::get('admin/cashproxy','Admin\CashController@cashproxylist');//代理佣金提现列表
	Route::post('admin/cashproxy/useragree','Admin\CashController@agreecash');//同意提现
	Route::post('admin/cashproxy/userdisagree','Admin\CashController@disagreecash');//拒绝提现
	Route::get('admin/cash','Admin\CashController@cashlist');//平台佣金提现列表
	Route::post('admin/cash/useragree','Admin\CashController@agreetoget');//同意提现
	Route::post('admin/cash/userdisagree','Admin\CashController@disagreetoget');//拒绝提现
	Route::get('admin/setting','Admin\SettingController@setlist');//参数修改
	Route::post('admin/setting/updateone','Admin\SettingController@updateone');//参数修改
	Route::get('admin/account','Admin\SettingController@account');//账户修改
	Route::post('admin/account/accountchange','Admin\SettingController@accountchange');//账户修改
	Route::get('admin/adminlist','Admin\UserController@adminlist');//管理员列表
	Route::post('admin/adminlist/reset','Admin\UserController@passwordreset');//密码重置
	Route::post('admin/adminlist/admindel','Admin\UserController@admindelete');//密码重置
	Route::match(['get','post'],'admin/adminlist/tobeadd','Admin\UserController@adminadd');//添加管理员
});
